The present invention relates to multiprocessor (MP) systems, and particularly to MPEG1/MPEG2 bitstream decoding utilizing multi-processor systems.
Bitstreams such as an MPEG bitstream are utilized to provide pictures or images in processing systems. FIG. 1 illustrates the general structure 10 of an MPEG bitstream. The MPEG bitstream can be broken down into a number of variable-length compressed pictures 12 and 14, each of which in turn can be broken down into a number of variable-length compressed slices 20-1, 20-2, 20-n and 22-1, 22-2 and 22-n. Since these compressed pictures 12 and 14 and slices 20-1 to 22-n are of variable lengths, a single-processor system cannot predict where the start of next slice/picture is in the bitstream, until it has finished decoding the current slice/picture.
To enhance decoding efficiency and speed, a multi-processor system may be used to decode a single MPEG1/MPEG2 bitstream. However, a typical multi-processor system does not know how to take advantage of its architecture in order to enhance decoding and searching speed and efficiency, and normally just use a single processor within the multiprocessor system to decode MPEG1/MPEG2 bitstreams.
Traditionally when a multi-processor system decodes MPEG1/MPEG2 bitstreams, each processor in the multi-processor system is assigned a number of compressed slices to process. The Ad-hoc method would be for each processor to be pre-assigned a certain of compressed slices, search for them, and decode them. However, the searching of the slices are time-consuming, does not leverage on the knowledge of what the other processors have obtained, and the computing power of all the processors in the multiprocessor system is not optimally allocated. Accordingly, what is needed is a system and method for concurrently process MPEG1/MPEG2 bitstreams utilizing multiple processors in an efficient and accurate manner. The present invention addresses such a need.
A method and system for concurrent processing of slices of a bitstream in a multiprocessor (MP) system is disclosed. The MP system includes a number of identical processors and a common memory. The memory is for receiving a plurality of bitstreams (preferably MPEG2 bitstreams) as a plurality of slices. The method and system comprises accessing a semaphore register by one of the plurality of processors and searching for an associated slice within the memory by the one processor. The method and system further comprises processing the associated slice by the one processor. Finally, the method and system comprises updating a memory location which holds the last address of the associated slice by the one processor; wherein subsequent processors search for each of the plurality of slices from the updated last address in the register.
A system and method in accordance with the present invention provides for intercommunication between the plurality of processors within a multiprocessing system. By determining within a semaphore the most recent location of the decoding task, the time and effort spent on searching for new starting location of new task is minimized. Accordingly, the decoding process is parallel, and in most cases averages out the decoding demand on the processors.
Accordingly, each of the processors within the multiprocessor system, only needs to search from the address of the bitstream through the remainder of the bitstream to obtain the slice. This process is repeated for each of the processors until the bitstream is processed. Therefore, in a system and method in accordance with the present invention there is no requirement that a processor search from the beginning of the bitstream to the point where the slice originates because the address pointers are updated at the point where the last slice has been operated on. This provides for a more efficient system for processing bitstreams in a parallel fashion.